#pragma once
#include <cv.h>
#include <highgui.h>

class SupportiveFunctions
{
public:

	static const char* CenterMarkerFile;
	static const char* LeftMarkerFile;
	static const char* RightMarkerFile;
	static const char* StethMarkerFile;

	SupportiveFunctions(void);
	~SupportiveFunctions(void);

	//Algorithms
	static bool WithinRegion(IplImage * image, IplImage* templateImage, CvPoint point);
	static int GetLocationScore(int locationX, int referenceLocationX);
	static int GetDifference(IplImage * imageBig, IplImage * imageSmall, CvPoint pointToPlace);

	//template matching 
	static CvPoint GetMatchWithMarker(IplImage* source, IplImage* templateSource, int & value);
	static CvPoint GetMatchWithMarker(IplImage* source, IplImage* templateSource);

	//image processing util
	static IplImage * GetCroppedImage(IplImage * source, CvRect rect);
	static void SaveImageRegion(IplImage * source, CvRect rect, const char* fileName);
	static IplImage * SetZeroToRegion(IplImage * source, CvRect rect);
	static void SetZeroOnRegion(IplImage * source, CvRect rect);
	static IplImage * PasteImage(IplImage * PastingImage, IplImage * pastedImage, CvPoint pointToPlace);
	static void ApplySobel(IplImage * src, IplImage * dest);
};
